<?php
abstract class Number {
	/**
	 * Empty default constructor.
	 */
	public function __construct() {
	}
	
	/**
	 * Returns this object's value as a byte. Might involve rounding and/or
	 * truncating the value, so it fits into a byte.  
	 * 
	 * @return the primitive byte value of this object.
	 */
	public function byteValue() {
		return $this->intValue ();
	}
	
	/**
	 * Returns this object's value as a double. Might involve rounding.
	 * 
	 * @return the primitive double value of this object.
	 */
	abstract public function doubleValue();
	
	/**
	 * Returns this object's value as a float. Might involve rounding.
	 * 
	 * @return the primitive float value of this object.
	 */
	abstract public function floatValue();
	
	/**
	 * Returns this object's value as an int. Might involve rounding and/or
	 * truncating the value, so it fits into an int.
	 * 
	 * @return the primitive int value of this object.
	 */
	abstract public function intValue();
	
	/**
	 * Returns this object's value as a long. Might involve rounding and/or
	 * truncating the value, so it fits into a long.
	 * 
	 * @return the primitive long value of this object.
	 */
	abstract public function longValue();
	
	/**
	 * Returns this object's value as a short. Might involve rounding and/or
	 * truncating the value, so it fits into a short.
	 * 
	 * @return the primitive short value of this object.
	 */
	public function shortValue() {
		return $this->intValue ();
	}

}

?>